import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download,
    upload: $upload
} = request

// 查询抢险车辆全部
export const riskVehiclesList = data => {
    return $get('/risk/riskVehicles/list', data)
}

// 查询抢险车辆列表
export const riskVehiclesPage = data => {
    return $get('/risk/riskVehicles/page', data)
}

// 新增抢险车辆
export const riskVehiclesAdd = data => {
    return $post('/risk/riskVehicles/add', data)
}

// 查询抢险车辆详情
export const riskVehiclesDetail = id => {
    return $get('/risk/riskVehicles/detail/'+ id)
}

// 更新抢险车辆
export const riskVehiclesUpdate = data => {
    return $post('/risk/riskVehicles/update', data)
}

// 删除抢险车辆
export const riskVehiclesDelete = id => {
    return $post('/risk/riskVehicles/delete/'+ id)
}

// 导出抢险车辆
export const riskVehiclesExport = (data,fileName) => {
    return $download('/risk/riskVehicles/export',data, fileName)
}

// 下载模板
export const riskVehiclesTemplate = (data,filename) => {
  return $download('/risk/riskVehicles/template',data, filename)
}

// 导入
export const riskVehiclesImport = (formData) => {
  return $upload('/risk/riskVehicles/import', formData)
}
